export function setLocal(k, v) {
  localStorage.setItem(k, JSON.stringify(v));
}

export function getLocal(k) {
  const val = localStorage.getItem(k);
  try {
    return JSON.parse(val);
  } catch (error) {
    return val;
  }
}

export function removeLocal(k) {
  localStorage.removeItem(k);
}
